package com.gywj.race.service;

import com.gywj.race.config.exception.BaseException;
import com.gywj.race.entity.AlumniAssociation;
import com.gywj.race.entity.AlumniAssociationExample;
import com.gywj.race.mapper.AlumniAssociationMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * The type Alumni association service.
 */
@Service
public class AlumniAssociationService {
    @Resource
    private AlumniAssociationMapper alumniAssociationMapper;

    /**
     * 获取校友会列表 下拉框
     *
     * @return the alumni association list
     */
    public List<AlumniAssociation> getAlumniAssociationList() {
        try {
            List<AlumniAssociation> alumniAssociations = alumniAssociationMapper.selectByExample(new AlumniAssociationExample());
            return alumniAssociations;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BaseException(e.getMessage());
        }
    }
}
